<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" method="post">
                    <input type="hidden" name="category[id]" value="<?php echo $category['id']; ?>" />
                    <div class="widget-body">
                        <fieldset>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">栏目信息-编辑</div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">栏目名称 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="category[title]"
                                           value="<?php echo $category['title']; ?>" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">上级栏目 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <label class="am-form-label" style="color:red;">
                                        <input type="hidden" name="category[parent_id]" value="<?php echo $category['parent_id']; ?>" />
                                        <?php echo $parent_text; ?>
                                    </label>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">模型 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <select name="category[type]" required>
                                        <option value="0" <?php if($category['type'] == 0) { echo 'selected'; } ?>>请选择模型</option>
                                        <?php foreach($types as $v): ?>
                                            <option value="<?php echo $v['id']; ?>" <?php if($category['type'] == $v['id']) { echo 'selected'; } ?>><?php echo $v['model_name']; ?></option>
                                        <?php endforeach; ?>
                                    </select>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">排序 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="number" class="tpl-form-input" name="category[sort_order]"
                                           value="<?php echo $category['sort_order']; ?>" required>
                                    <small>数字越小越靠前</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">标题 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="category[web_title]"
                                           value="<?php echo $category['web_title']; ?>">
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">关键字 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="category[web_kw]"
                                           value="<?php echo $category['web_kw']; ?>">
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">描述 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <textarea name="category[web_desc]"><?php echo $category['web_desc']; ?></textarea>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                    <button type="submit" class="j-submit am-btn am-btn-secondary">提交
                                    </button>
                                </div>
                            </div>

                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {

        $('#my-form').superForm();
    });
</script>
